package com.tjetc.controller;

import com.tjetc.domain.HospitalLevel;
import com.tjetc.service.HospitalLevelService;
import com.tjetc.service.impl.HospitalLevelServiceImpl;
import com.tjetc.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (hospital_level)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/hospitalLevel")
public class HospitalLevelController {
    /**
     * 服务对象
     */
    @Resource
    private HospitalLevelService hospitalLevelService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public HospitalLevel selectOne(Integer id) {
        return hospitalLevelService.selectByPrimaryKey(id);
    }

    @GetMapping("getAll")
    public Result getAll() {
        return hospitalLevelService.selectAll();
    }
}
